<template>
  <div>
    <div class="itme" v-for="(itme, index) of list" :key="index">
      <div class="itme-title border-bottom">
        <span class="itme-title-icon"></span>
        {{itme.title}}
      </div>
      <!-- 递归组件，递归自身 -->
      <div v-if="itme.children" class="childRen">
        <detail-list :list="itme.children"></detail-list>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'DetailList',
  props: ['list']
}
</script>

<style lang="stylus" scoped>
  .itme-title
    line-height: .8rem
    font-size: .32rem
    padding: 0 .2rem
    .itme-title-icon
      position: relative
      display: inline-block
      width: .36rem
      height: .36rem
      top: .1rem
      left: .1rem
      background: url('../../../../static/incofont/detail.png') 0 -.45rem no-repeat;
      margin-right: .1rem
      background-size: .4rem 3rem
  .childRen
    padding-left: .2rem
</style>
